package com.wish.g01.business.util;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.wish.g01.base.entity.TbHouseInfo;
import com.wish.g01.base.mapper.TbHouseInfoMapper;
import com.wish.g01.base.service.ITbHouseInfoService;
import com.wish.g01.business.vo.HouseInfo;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;

/**
 * @Classname A
 * @Description TODO
 * @Version 1.0.0
 * @Date 2022/6/12 22:45
 * @Created by wupenghao
 */
@Data
@AllArgsConstructor
public class ThredQuery implements Callable<List<TbHouseInfo>> {

   private ITbHouseInfoService tbHouseInfoService;//需要通过够早方法把对应的业务service传进来 实际用的时候把类型变为对应的类型
  //  private QueryWrapper<TbHouseInfo> houseWrapper;//查询条件 根据条件来定义该类的属性

    private Integer bindex;//分页index
    private Integer num;//数量

    @Override
    public List<TbHouseInfo> call() throws Exception {
        PageHelper.startPage(bindex,num);
        return tbHouseInfoService.list();
    }

}
